package top.tangyh.lamp.care.vo.result;

import cn.hutool.core.map.MapUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import top.tangyh.basic.base.entity.Entity;
import top.tangyh.basic.interfaces.echo.EchoVO;
import top.tangyh.lamp.care.entity.BPgSrx;

import java.io.Serializable;

/**
 * <p>
 * 表单查询方法返回值VO
 * 评估评分输入项
 * </p>
 *
 * @author zqb
 * @date 2024-07-09 17:07:17
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Builder
@Schema(description = "评估评分输入项")
public class BPgSrxResultVO extends Entity<Long> implements Serializable, EchoVO {

    private static final long serialVersionUID = 1L;

    private Map<String, Object> echoMap = MapUtil.newHashMap();

    @Schema(description = "")
    private Long id;

    @Schema(description ="普通输入项明细集合")
    private List<BPgSrxDetailNormalResultVO> normalDetailList;

    /**
    * 所属评估评分id
    */
    @Schema(description = "所属评估评分id")
    private Long pgId;
    /**
    * 输入项名称
    */
    @Schema(description = "输入项名称")
    private String srxName;
    /**
    * 输入项类型code
    */
    @Schema(description = "输入项类型code")
    private String srxTypeCode;
    /**
    * 输入项步骤数字 默认1
    */
    @Schema(description = "输入项步骤数字 默认1")
    private Integer srxBz;
    /**
    * 对应布局id或标识未定
    */
    @Schema(description = "对应布局id或标识未定")
    private String srxBj;
    /**
    * 布局缩写
    */
    @Schema(description = "布局缩写")
    private String bjShortName;
    /**
    * 范围开始 如果是类型是区间(必填)
    */
    @Schema(description = "范围开始 如果是类型是区间(必填)")
    private BigDecimal rangeStart;
    /**
    * 范围结束 如果是类型是区间(必填)
    */
    @Schema(description = "范围结束 如果是类型是区间(必填)")
    private BigDecimal rangeEnd;
    /**
    * 排序 默认1
    */
    @Schema(description = "排序 默认1")
    private Integer orders;

    /**
    * 是否自定义，1是自定义，默认0
    */
    @Schema(description = "是否自定义，1是自定义，默认0")
    private Integer isDiy;
    /**
    * 
    */
    @Schema(description = "")
    private String srcL1;
    /**
    * 数据来源-层级2
    */
    @Schema(description = "数据来源-层级2")
    private String srcL2;
    /**
    * 数据来源-层级3
    */
    @Schema(description = "数据来源-层级3")
    private String srcL3;
    /**
    * 是否总分输入项，0-否，1-是，默认是0
    */
    @Schema(description = "是否总分输入项，0-否，1-是，默认是0")
    private Integer hasScore;
    /**
    * 区间类型是否启用分值，默认0，0-否，1-是
    */
    @Schema(description = "区间类型是否启用分值，默认0，0-否，1-是")
    private Integer enableScore;

    public BPgSrxResultVO(BPgSrx srxPO) {
        this.id = srxPO.getId();
        this.pgId = srxPO.getPgId();
        this.srxName = srxPO.getSrxName();
        this.srxTypeCode = srxPO.getSrxTypeCode();
        this.srxBz = srxPO.getSrxBz();
        this.srxBj = srxPO.getSrxBj();
        this.bjShortName = srxPO.getBjShortName();
        this.rangeStart = srxPO.getRangeStart();
        this.rangeEnd = srxPO.getRangeEnd();
        this.isDiy = srxPO.getIsDiy();
        this.hasScore = srxPO.getHasScore();
        this.srcL1 = srxPO.getSrcL1();
        this.srcL2 = srxPO.getSrcL2();
        this.srcL3 = srxPO.getSrcL3();
        this.enableScore = srxPO.getEnableScore();
    }

}
